import request from '@/utils/request'

const {
    get: $get,
    post: $post,
    delete: $delete,
    download: $download
} = request

// 查询城市体检自定义预警结果全部
export const cityDiyResultList = data => {
    return $get('/risk/cityDiyResult/list', data)
}

// 查询城市体检自定义预警结果列表
export const cityDiyResultPage = data => {
    return $get('/risk/cityDiyResult/page', data)
}

// 新增城市体检自定义预警结果
export const cityDiyResultAdd = data => {
    return $post('/risk/cityDiyResult/add', data)
}

// 查询城市体检自定义预警结果详情
export const cityDiyResultDetail = id => {
    return $get('/risk/cityDiyResult/detail/'+ id)
}

// 更新城市体检自定义预警结果
export const cityDiyResultUpdate = data => {
    return $post('/risk/cityDiyResult/update', data)
}

// 删除城市体检自定义预警结果
export const cityDiyResultDelete = id => {
    return $post('/risk/cityDiyResult/delete/'+ id)
}

// 导出城市体检自定义预警结果
export const cityDiyResultExport = (data,fileName) => {
    return $download('/risk/cityDiyResult/export',data, fileName)
}

export const updateTargetRule = data=>{
  return $post('/risk/cityCheckTarget/updateTargetRule', data)
}

export const getCityCheckTargetDetail = id =>{
  return $get('/risk/cityCheckTarget/getDetail/'+ id)
}
